/*
 * @Author: your name
 * @Date: 2020-07-24 13:26:19
 * @LastEditTime: 2020-07-24 15:17:57
 * @LastEditors: your name
 * @Description: In User Settings Edit
 * @FilePath: \ZfjdWebReportGenerationPlugin\src\zfjdReportGeneratPluginModules\assets\api.js
 */

let isPrefix = process.env.NODE_ENV === 'development' ? '' : '' // 判断环境是否加demo
let $api = params => {
  return new Promise(resolve => {
    let method = params.type === 'post' ? 'postRequestBody' : params.type
    window.vue.$apiAxios[method](params.url, params.params, response => {
      resolve(response.data)
    })
  })
}

export default {
  // 根据用户id获取用户信息
  getUserInfo(params, response) {
    window.vue.$apiAxios.get(
      `${isPrefix}/whitePaper/User/getUserInfo`,
      params,
      response
    )
  },
}

